import React from 'react';
import {useParams} from 'react-router-dom';
function Post(){
    //可以通过useParams自定义的hooks获取到路径参数对象
    const params = useParams();
    return (
        <div>Post:{params.id}</div>
    )
}
export default Post;